package me.aartikov.sharedelementanimationsample;

import me.aartikov.alligator.OhosNavigator;
import me.aartikov.alligator.NavigationContextBinder;
import me.aartikov.alligator.Navigator;
import me.aartikov.alligator.ScreenResolver;
import me.aartikov.alligator.navigationfactories.GeneratedNavigationFactory;
import me.aartikov.alligator.navigationfactories.NavigationFactory;
import ohos.aafwk.ability.AbilityPackage;

public class SampleApplication extends AbilityPackage {

    private static OhosNavigator sOhosNavigator;

    public static void setsOhosNavigator(OhosNavigator sOhosNavigator) {
        SampleApplication.sOhosNavigator = sOhosNavigator;
    }

    @Override
    public void onInitialize() {
        super.onInitialize();
        setsOhosNavigator(new OhosNavigator(new GeneratedNavigationFactory()));
    }


    public static Navigator getNavigator() {
        return sOhosNavigator;
    }

    public static NavigationFactory getNavigationFactory() {
        return sOhosNavigator.getNavigationFactory();
    }

    public static NavigationContextBinder getNavigationContextBinder() {
        return sOhosNavigator;
    }

    public static ScreenResolver getScreenResolver() {
        return sOhosNavigator.getScreenResolver();
    }
}
